package com.yh.modules.data.schedule;

import com.yh.modules.data.service.MachineDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.Date;

/**
 * created by skh on 2019/2/27
 */
@Component
public class ScheduledTasks {
	@Autowired
	private MachineDataService machineDataService;

	@Scheduled(cron = "0 0 0 * * ? ")
	public void deleteDataFromAWeekAge() {
		machineDataService.deleteDataFromAWeekAge();
	}
}
